package calcmaster.calculator.domain;

public class Instruction {
	private InstructionType instructionType;
	private double number;
	private FunctionType functionType;
	
	private Instruction(InstructionType instructionType, double number, FunctionType functionType) {
		this.instructionType = instructionType;
		this.number = number;
		this.functionType = functionType;
	}
	
	public Instruction(double number) {
		this(InstructionType.USE_NUMBER, number, null);
	}
	
	public Instruction(FunctionType functionType) {
		this(InstructionType.CALL_FUNCTION, 0.0, functionType);
	}
	
	public Instruction(InstructionType instructionType) {
		this(instructionType, 0.0, null);
	}
	
	public InstructionType getInstructionType() {
		return instructionType;
	}
	
	public double getNumber() {
		return number;
	}
	
	public FunctionType getFunctionType() {
		return functionType;
	}
	
}
